package javabase.schoolwork.day6_11;

import org.junit.Test;

/**
 * @author fance
 * @date 18-6-11 下午4:52
 */
public class Sum {
    // 不建议可变参数

    public void fun1() {
        for (int i = 0; i < 10; i++) {
            System.out.println(i);
            i *= 0.1;
        }
    }
    public void fun2() {
        int i = 80;
        String s = String.valueOf(i < 100 ? 90 : 100);
        String s1 = String.valueOf(i < 100 ? 90 : 100);
        System.out.println(s.equals(s1));
    }
    public void fun3() {
        String s = "";
        s += "1";


        s = s.concat("2");

        s = new StringBuilder("a").append("c").toString();
    }
  /*  字节码中为
    public void fun3() {
        String s = "";
        s = s + "1";
        s = s.concat("2");
        s = "a" + "c";
    }*/
    @Test
    public void test() {
//         fun1();
//        fun2();
        fun3();
//        fun4();
    }
}
